import request from '@/utils/request';

let baseURL = '/property-portal/v1/api';

// 保险项目列表
export const insuranceProjectListApi = params => {
	return request({
		url: `${baseURL}/tInsurance/queryProjectInsuranceList`,
		method: 'post',
		data: params,
	});
};

// 保险-新增--------------------------------------------------------------------保险----------------------------------------------------------------------
export const insuranceAddApi = params => {
	return request({
		url: `${baseURL}/tInsurance/createInsurance`,
		method: 'post',
		data: params,
	});
};

// 保险-更新
export const insuranceUpdateApi = params => {
	return request({
		url: `${baseURL}/tInsurance/updateInsurance`,
		method: 'post',
		data: params,
	});
};

// 保险-详情
export const insuranceInfoApi = params => {
	return request({
		url: `${baseURL}/tInsurance/findInsuranceViewById`,
		method: 'post',
		data: params,
	});
};

// 保险-列表
export const insuranceListApi = params => {
	return request({
		url: `${baseURL}/tInsurance/queryInsuranceList`,
		method: 'post',
		data: params,
	});
};

// 保险-附件
export const insuranceFileApi = params => {
	return request({
		url: `${baseURL}/tInsurance/queryInsuranceAttachmentList`,
		method: 'post',
		data: params,
	});
};

// 保险-导出
export const insuranceExportApi = data => {
	return request({
		url: `${baseURL}/tInsurance/exportInsurance`,
		method: 'post',
		data,
		responseType: 'blob',
	});
};

// 保险-导入
export const insuranceImportApi = params => {
	return request({
		url: `${baseURL}/tInsurance/importInsurance`,
		method: 'post',
		data: params,
	});
};

// 保险配置-新增--------------------------------------------------------------------保险配置----------------------------------------------------------------------
export const insuranceSettingAddApi = params => {
	return request({
		url: `${baseURL}/tInsurance/saveInsuranceConfig`,
		method: 'post',
		data: params,
	});
};

// 保险配置-详情
export const insuranceSettingInfoApi = params => {
	return request({
		url: `${baseURL}/tInsurance/findInsuranceConfigViewById`,
		method: 'post',
		data: params,
	});
};
